package org.springframework.boot.autoconfigure.dubbo.configuration;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * dubbo的属性配置
 * 
 * @author wolfking@赵伟伟
 * @mail zww199009@163.com
 * @创作日期 2017年4月18日 下午8:37:33
 * @copyright wolfking
 */
@ConfigurationProperties(prefix = "spring.dubbo")
public class DubboConfiguration {

	// 应用名称
	private String name;
	// 注册中心地址
	private String address;
	// 协议,默认dubbo
	private String protocol = "dubbo";
	// 默认发布服务端口
	private int port = 10000;
	// 发布服务的工作线程数
	private int threads = 200;
	// 版本,{@link com.alibaba.dubbo.config.annotation.Service#version()}
	private String version = "";
	// dubbo group,{@link com.alibaba.dubbo.config.annotation.Service#group()}
	private String group = "";
	// payload,默认设置10M
	private int payload = 1024*1024;
	/**
	 * @return name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            要设置的 name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return registry
	 */
	public String getAddress() {
		return address;
	}

	/**
	 * @param registry
	 *            要设置的 address
	 */
	public void setAddress(String address) {
		this.address = address;
	}

	/**
	 * @return protocol
	 */
	public String getProtocol() {
		return protocol;
	}

	/**
	 * @param protocol
	 *            要设置的 protocol
	 */
	public void setProtocol(String protocol) {
		this.protocol = protocol;
	}

	/**
	 * @return port
	 */
	public int getPort() {
		return port;
	}

	/**
	 * @param port
	 *            要设置的 port
	 */
	public void setPort(int port) {
		this.port = port;
	}

	/**
	 * @return nthread
	 */
	public int getThreads() {
		return threads;
	}

	/**
	 * @param nthread
	 *            要设置的 nthread
	 */
	public void setThreads(int threads) {
		this.threads = threads;
	}

	/**
	 * @return version
	 */
	public String getVersion() {
		return version;
	}

	/**
	 * @param version
	 *            要设置的 version
	 */
	public void setVersion(String version) {
		this.version = version;
	}

	/**
	 * @return group
	 */
	public String getGroup() {
		return group;
	}

	/**
	 * @param group
	 *            要设置的 group
	 */
	public void setGroup(String group) {
		this.group = group;
	}

	/**
	 * @return payload
	 */
	public int getPayload() {
		return payload;
	}

	/**
	 * @param payload 要设置的 payload
	 */
	public void setPayload(int payload) {
		this.payload = payload;
	}
	

}
